<div class="galleries view">
<h2><?php  echo __('Gallery'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($gallery['Gallery']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Name'); ?></dt>
		<dd>
			<?php echo h($gallery['Gallery']['name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Date'); ?></dt>
		<dd>
			<?php echo h($gallery['Gallery']['date']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Description'); ?></dt>
		<dd>
			<?php echo h($gallery['Gallery']['description']); ?>
			&nbsp;
		</dd>
	</dl>

	<div class="related">
		<h3><?php echo __('Related Uploads'); ?></h3>
		
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<th><?php echo __('Size'); ?></th>
			<th><?php echo __('Modified'); ?></th>
			<th><?php echo __('Description'); ?></th>
			<th class="actions"><?php echo $this->Html->link(__('+ Add File'), array('controller' => 'galleries', 'action' => 'add_file',$gallery['Gallery']['id'])); ?></th>
		</tr>
		<?php if (!empty($gallery['Upload'])):
			$i = 0;
			foreach ($gallery['Upload'] as $upload): ?>
			<tr>
				<td><?php echo $upload['id']; ?></td>
				<td><?php echo $this->Html->image($this->FileUpload->image($upload['name'],array('width'=>150,'imagePathOnly'=>true)),array('alt'=>h($upload['name']))); $this->Html->link($upload['name'],$upload['name']);?></td>
				<td><?php echo $upload['size']; ?></td>
				<td><?php echo $upload['modified']; ?></td>
				<td><?php echo $upload['description']; ?></td>
				<td class="actions">
					<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'galleries', 'action' => 'delete_file', $upload['id']), null, __('Are you sure you want to delete # %s?', $upload['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		<?php endif; ?>
		</table>
	
	</div>
	
	<div class="related">
		<h3><?php echo __('Related Kursy Types'); ?></h3>
		<?php if (!empty($gallery['KursyType'])): ?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<th><?php echo __('Description'); ?></th>
			<th><?php echo __('Slug'); ?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($gallery['KursyType'] as $kursyType): ?>
			<tr>
				<td><?php echo $kursyType['id']; ?></td>
				<td><?php echo $kursyType['name']; ?></td>
				<td><?php echo $kursyType['description']; ?></td>
				<td><?php echo $kursyType['slug']; ?></td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>
	</div>	
</div>

<?php echo $this->element('/menu/left')?>

